package org.liliya.service;

import org.liliya.pojo.Product;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ProductService {
    @Value("${server.port}")
    String port;
    public List<Product> getProducts(){
        ArrayList<Product> products = new ArrayList<>();
        products.add(new Product(1,"伊利"+port,2));
        products.add(new Product(2,"蒙牛牛奶",3));
        products.add(new Product(3,"光明",4));
        return products;
    }
}
